#ifndef VIS_DRAW_H
#define VIS_DRAW_H

#include <QDockWidget>
#include <QGraphicsScene>
namespace Ui {
class vis_draw;
}

class vis_draw : public QDockWidget
{
    Q_OBJECT
    
public:
    explicit vis_draw(QWidget *parent = 0);
    ~vis_draw();
    float *fft;
    unsigned *wave;
    int wave_len, fft_len;
public slots:
    void d_repaint();
    void init(unsigned *wave, float *fft, int wave_len, int fft_len);
private:
    Ui::vis_draw *ui;
    QGraphicsScene scene;
    QPixmap *px;
    void spectrum_draw_frame(int x, int y);
    int fft_peaks[128];
    int fft_falloff[128];
    int _SPEC_HEIGHT;
};

#endif // VIS_DRAW_H
